﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FoneBuddy.LinqModel.Data;

namespace FoneBuddy.LinqModel
{
    public partial class ProductImageInfo
    {
        #region
        private IDataRepository _dataObject;
        #endregion

        public ProductImageInfo(IDataRepository dataObject)
            : this()
        {
            _dataObject = dataObject;
        }
        public void CreateAll(List<ProductImageInfo> pimg)
        {
            _dataObject.CreateAllProductImage(pimg);
        }
        public void Create()
        {
            try
            {
                _dataObject.CreateProductImage(this);
            }
            catch (Exception ex)
            {
            }
        }
        public List<ProductImageInfo> GetImagesById()
        {
            return _dataObject.GetProductImagesById(this);
        }
        public List<ProductImageInfo> GetAll()
        {
            return _dataObject.GetAllProductImage();
        }
        public void Delete()
        {
            _dataObject.DeleteProductImage(this);
        }
    }
}
